<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%-- <%
	String path = request.getContextPath(); 
	String basePath = request.getScheme() + "://"
				+ request.getServerName() + ":"
			+ request.getServerPort() + path+"/";
	%> --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
</head>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<body>
<div class="container">
	<h2>工作笔记</h2>
	<a href="${pageContext.request.contextPath}/working/add">添加笔记</a>
	<form action="${pageContext.request.contextPath }/working/list" method="get">
		<table border="1" cellspacing="0" width="400">
			<tr>
				<th>笔记标题</th>
				<th>笔记分类</th>
				<th>编写时间</th>
				<th>操作</th>
			</tr>
			<c:forEach items="${list}" var="working">
			<tr>
				<td>${working.title}</td>
				<td>${working.type}
					<c:if test="${working.type==1}">技术</c:if>
					<c:if test="${working.type==2}">行政</c:if>
					<c:if test="${working.type==3}">人事</c:if>
				</td>
				<td>${working.createDate}</td>
				<td>
					<a href="${working.id}">查看</a>
				</td>
			</tr>
			</c:forEach>
		</table>
		</form>
</div>
 <script>
	$(function(){
		$("th :odd").css("background-color: seagreen;");
	});
</script> 
</body>
</html>